<?php

namespace App\Http\Controllers;

use App\Events\OrderShipped;
use App\Models\Navigation;
use App\Services\ArticleService;
use App\Services\SystemService;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Mail;
use function Psy\debug;
use Illuminate\Support\Facades\Log;
class MainController extends Controller
{
    //
    public function index()
    {
//        event(new OrderShipped('jshshdihsid'));
//        Log::debug('An informational message.');
        $article_title_list = $this->_articleService->getArticleTitle('main');
        $data['article_title_list'] = $article_title_list;
        return $this->layout_view('main', $data);
    }

    public function two()
    {
        return '201812030157435ma1nfrvmvgb7egwnqpvw2vhmr23p5h9bbwpx8jzs034wix5l9';
    }
    public function test()
    {
        $name='lili';
//        Mail::send('emails.test',['name'=>$name],function($message){
//            $to = 'yezongtiao@tongniutech.com';
//            $message ->to($to)->subject('邮件测试');
//        });
        Mail::raw('你好，我是PHP程序！', function ($message) {
            $to = 'yezongdiao@idanchuang.com';
            $message ->to($to)->subject('纯文本信息邮件测试');
        });
    }



}
